package com.ym9527.entity;


import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

//这是失物招领回复帖子
@Entity()
@Data
@Table(name = "school_message")
public class ResponseMessage {

    @TableGenerator(
            name="ID_GENERATOR",
            table="ID_GEN",
            pkColumnName = "GEN_NAME",
            pkColumnValue = "RES_PK",
            valueColumnName = "GEN_VALUE",
            initialValue = 1,
            allocationSize = 1
    )
    @GeneratedValue(strategy= GenerationType.TABLE, generator="ID_GENERATOR")
    @Id
    @Column(name = "message_id",length = 50)
    private Long  messageId;

    /**
     * 这是发送的用户ID
     */
    @Column(name = "send_user_id",length = 50)
    private Long sendUserId;

    /**
     * 这是发送的帖子id
     */
    @Column(name = "send_lost_id",length = 50)
    private Long sendLostId;

    /**
     * 这是发送的消息内容
     */
    @Column(name = "message",length = 256)
    private String message;

    /**
     * 这是发送消息的时间
     */
    @Column(name = "send_time")
    private Date sendTime;


    @Transient
    private String sentUserName;




}
